package com.baitiaojun.moments.feign;

import com.baitiaojun.api.domain.user.UserInfo;
import com.baitiaojun.api.exception.ConditionException;
import com.baitiaojun.api.vo.JsonRes;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.Set;

/**
 * @类名 UserFollowingFeign
 * @作者 白条君
 * @创建日期 2022/12/3 18:02
 * @版本 1.0
 */
@FeignClient(value = "imooc-bilibili-user", path = "/user")
public interface UserFeign {

    @GetMapping("/fans/search-user-fans-with-userid")
    JsonRes getFans(@RequestParam("userId") Long userId) throws Exception;

    @GetMapping("/fans/search-user-fansList-with-userid")
    JsonRes getFansList(@RequestParam("userId") Long userId) throws Exception;

    @GetMapping("/user-info")
    UserInfo getUserInfo(@RequestParam("userId") Long userId) throws Exception;

    @GetMapping("/user-following/user-following-ids")
    Set<Long> getFollowingUserIds(@RequestParam("userId") Long userId) throws ConditionException;

    @GetMapping("/person-other-information")
    JsonRes getOtherUserInfo(@RequestParam("id") Long id) throws Exception;
}